package com.project.bean;

import java.time.LocalDate;

public class UnitBean {
    /**设施id*/
    private int unitId;
    /**设施报损信息*/
    private String unitInfo;
    /**设施报损日期*/
    private LocalDate date = LocalDate.now();
    /**设施是否解决状态（已解决/未解决）*/
    private String unState = "未解决";
    /**该设施所在房间*/
    private RoomBean roomBean;

    public UnitBean(String unitInfo, LocalDate date, String unState, int roomId) {
        this.unitInfo = unitInfo;
        this.date = date;
        this.unState = unState;

        this.roomBean = new RoomBean();
        this.roomBean.setRoomId(roomId);
    }
    public UnitBean(String unitInfo,int roomId) {
        this.unitInfo = unitInfo;

        this.roomBean = new RoomBean();
        this.roomBean.setRoomId(roomId);
    }

    public UnitBean() {
    }

    public int getUnitId() {
        return unitId;
    }

    public void setUnitId(int unitId) {
        this.unitId = unitId;
    }

    public String getUnitInfo() {
        return unitInfo;
    }

    public void setUnitInfo(String unitInfo) {
        this.unitInfo = unitInfo;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getUnState() {
        return unState;
    }

    public void setUnState(String unState) {
        this.unState = unState;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    @Override
    public String toString() {
        return "UnitBean{" +
                "unitId=" + unitId +
                ", unitInfo='" + unitInfo + '\'' +
                ", date=" + date +
                ", unState='" + unState + '\'' +
                ", roomBean=" + roomBean +
                "}\n";
    }
}
